package com.ssm.web;

import com.ssm.Service.moveShopService;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.PrintWriter;

@WebServlet(name = "moveShopServlet",urlPatterns = "/moveshop")
public class moveShopServlet extends HttpServlet {
    protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {

    }

    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
//        System.out.println("移入收藏夹请求送达");
        String name=request.getParameter("name");
        String picture=request.getParameter("picture");
        String place=request.getParameter("place");
        String username=request.getParameter("username");
//        System.out.println("username:"+username);
        moveShopService moveShopService=new moveShopService();

        boolean b = moveShopService.moveTo(name, place, picture,username);

//        System.out.println("b:"+b);
        PrintWriter writer=response.getWriter();
        writer.print(b);
        writer.close();
    }
}
